
$vista = Get-WmiObject -Query "SELECT * FROM Win32_ServerFeature WHERE ID = 2"
$seven = Get-WmiObject -Query "SELECT * FROM Win32_OptionalFeature WHERE name = 'IIS-WebServerRole'"
$vista -ne $null -or $seven.InstallState -eq 1